package ${basePackage}.${controllerPackage};

import com.feng.cloud.common.response.RestResponse;
import ${basePackage}.${entityPackage}.${className};
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.util.List;

/**
* ${tableComment} Controller接口
*
* @author ${author}
* @date ${date}
*/
@RequestMapping("${className?uncap_first}")
public interface I${className}Controller {

    /**
    * 查询（所有）
    *
    * @param ${className?uncap_first} ${className?uncap_first}
    * @return RestResponse<List<${className}>>
    */
    @GetMapping("list")
    RestResponse<List<${className}>> find${className}s(${className} ${className?uncap_first});

    /**
    * 根据id查询
    *
    * @param ${className?uncap_first} ${className?uncap_first}
    * @return RestResponse<${className}>
    */
    @GetMapping("{id}")
    RestResponse<${className}> findOne${className}(@PathVariable Long id);


    /**
    * 新增
    *
    * @param ${className?uncap_first} ${className?uncap_first}
    * @return RestResponse<${className}>
    */
    @PostMapping
    RestResponse<${className}> add${className}(@Valid ${className} ${className?uncap_first});

    /**
    * 修改
    *
    * @param ${className?uncap_first} ${className?uncap_first}
    * @return RestResponse<${className}>
    */
    @PutMapping
    RestResponse<${className}> update(@Valid ${className} ${className?uncap_first});

}